from langchain_community.document_loaders import PyPDFLoader
from langchain.indexes.vectorstore import VectorstoreIndexCreator

file_path = "../钱学森.pdf"
loader = PyPDFLoader(file_path)

index = VectorstoreIndexCreator().from_loaders([loader])
ans = index.query("钱学森是哪里人？")